Skip to content

feat: serve stack-specific default project favicons#3854

Open
cgiangreco wants to merge 5 commits into
pingdotgg:mainfrom
cgiangreco:project-stack-default-icons
Open

feat: serve stack-specific default project favicons#3854
cgiangreco wants to merge 5 commits into
pingdotgg:mainfrom
cgiangreco:project-stack-default-icons

Conversation

@cgiangreco

@cgiangreco cgiangreco commented Jul 10, 2026

Copy link
Copy Markdown

What Changed

When a project has no favicon, detect the project's stack and serve a matching default icon instead of the generic folder icon. Detection is based on package.json dependencies and filesystem markers:

  • Next.js (next) → Next.js logo
  • Angular (@angular/core) → Angular shield
  • Svelte (svelte / @sveltejs/kit) → Svelte logo
  • Vue (vue / nuxt) → Vue chevron
  • React (react) → React logo
  • React Native / Expo (react-native / expo) → Android icon
  • Android/Gradle (settings.gradle / build.gradle present) → Android icon
  • YouTube (project directory name contains yt or youtube) → YouTube icon
  • TikTok (name contains tiktok) → TikTok icon
  • Instagram (name contains instagram / insta) → Instagram icon

Everything else falls back to the existing generic folder icon. Detection failures also degrade gracefully to the generic fallback, so behavior only changes for projects that match a known stack.

Works on both the Web and Desktop apps.

Why

Makes the projects panel a bit more fun, not having the default folder icon everywhere, and makes it easier to distinguish between projects.

UI Changes

Before
image

After
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
    ̶-̶ ̶[̶ ̶]̶ ̶I̶ ̶i̶n̶c̶l̶u̶d̶e̶d̶ ̶a̶ ̶v̶i̶d̶e̶o̶ ̶f̶o̶r̶ ̶a̶n̶i̶m̶a̶t̶i̶o̶n̶/̶i̶n̶t̶e̶r̶a̶c̶t̶i̶o̶n̶ ̶c̶h̶a̶n̶g̶e̶s̶ ==> no animation/interaction changes

cgiangreco and others added 5 commits July 10, 2026 11:30
When a project has no favicon, detect the project's stack and serve a
matching default icon instead of the generic folder: React/React Native
projects (react or react-native in package.json dependencies) get a
React icon, Gradle-based Android projects get an Android icon. Detection
failures degrade to the existing generic fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…and social platforms

Extends the stack-detection fallback to cover more common project types:
- Next.js (detected before plain React, via 'next' dependency)
- Angular (@angular/core), Svelte (svelte / @sveltejs/kit), Vue (vue / nuxt)
- YouTube, TikTok, Instagram (detected by project directory name pattern)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the multi-path robot body with a minimal 3-element head:
semicircle dome + rounded-bottom rectangle body, two short angled
antennae, and two eye circles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Expo projects (mobile-first, no Gradle files at root) now get the Android
icon via the `expo` dependency check. Also shrinks the body section of the
Android SVG so it reads as a head rather than a full robot torso.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Spread the antenna tips further apart and reduce their length so they
read more like the reference Android logo proportions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0ef11748-a76b-4831-82e5-41dd896714c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 10, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5e7467f. Configure here.

return SVELTE_PROJECT_FAVICON_SVG;
if (dependencyNames.has("vue") || dependencyNames.has("nuxt")) return VUE_PROJECT_FAVICON_SVG;
if (dependencyNames.has("expo") || dependencyNames.has("react-native"))
return ANDROID_PROJECT_FAVICON_SVG;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React Native shows Android icon

Medium Severity

Projects with expo or react-native dependencies are incorrectly assigned the Android favicon. The current dependency check order returns the Android icon before the react check, which was intended for React Native projects.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5e7467f. Configure here.

Comment thread apps/server/src/http.ts
return HttpServerResponse.text("Not Found", { status: 404 });
}
if (asset.kind === "project-favicon-fallback") {
return HttpServerResponse.text(FALLBACK_PROJECT_FAVICON_SVG, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cached fallback hides stack changes

Medium Severity

The fallback favicon SVG is now dynamically generated based on workspace configuration, but the Cache-Control: max-age=3600 header means browsers can serve an outdated icon for up to an hour after configuration changes (e.g., package.json, Gradle files), as the asset URL doesn't change.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5e7467f. Configure here.

@macroscopeapp

macroscopeapp Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

Two unresolved review comments identify bugs: React Native projects incorrectly receive the Android icon, and the caching behavior can serve stale favicons after configuration changes. These substantive issues require resolution before approval.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant